/**
 * 
 */
package evolution.mlp.functions;

/**
 * @author camille
 * 
 */
public class Tanh implements Function {

	private static Tanh singleton;

	private Tanh() {
		// nothing...
	}

	public static Tanh getInstance() {
		if (singleton == null) {
			singleton = new Tanh();
		}

		return singleton;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see mlp.functions.Function#eval(double)
	 */
	@Override
	public double eval(double x) {
		return Math.tanh(x);
	}

}
